def search_and_count(text, search_term):
    # 转为小写
    text = text.lower()
    search_term = search_term.lower()
    # 使用 str.count() 来统计匹配个数
    count = text.count(search_term)
    return count


# 调用函数实现该功能
text = input('请输入文本：')
search_term = input('请输入需匹配字符：')
count = search_and_count(text, search_term)
print(f"The term '{search_term}' appears {count} times in the text.")
